From: Ray Strode Date: Tue, 2 Apr 2013 03:57:55 +0000 (-0400) Subject: backgroundMenu: destroy menu when actor is destroyed X-Git-Tag: archive/raspbian/50.5-1+rpi1~1^2~1013^2^2~4373 X-Git-Url: https://dgit.raspbian.org/%22http://www.example.com/cgi/%22/%22http:/www.example.com/cgi/%22?a=commitdiff_plain;h=3c1f389e25636e475e958f321a20b6d5bcb0f304;p=gnome-shell.git backgroundMenu: destroy menu when actor is destroyed This fixes a leak. https://bugzilla.gnome.org/show_bug.cgi?id=697119 --- diff --git a/js/ui/backgroundMenu.js b/js/ui/backgroundMenu.js index cc6c65397..538abd5b9 100644 --- a/js/ui/backgroundMenu.js +++ b/js/ui/backgroundMenu.js @@ -55,4 +55,10 @@ function addBackgroundMenu(actor) { openMenu(); }); actor.add_action(clickAction); + + actor.connect('destroy', function() { + actor._backgroundMenu.destroy(); + actor._backgroundMenu = null; + actor._backgroundManager = null; + }); }